<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="template.xhtml">
	<ui:define name="body">
		<f:view>
			<h:form id="form1">
    			<rich:dataTable id="tbl_contactVersions" cellpadding="0" cellspacing="0" width="400" 
                   	value="#{addressBookController.contactVersions}" var="wrapper">
                    <f:facet name="header">
						<rich:columnGroup>
                            <rich:column colspan="4">
                                <h:outputText value="Contact Revisions" />
                            </rich:column>
                            <rich:column breakBefore="true">
                                <h:outputText value="type" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="date" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="name" />
                            </rich:column>
                            <rich:column>
                                <h:outputText value="email" />
                            </rich:column>
                        </rich:columnGroup>
                    </f:facet>
					<rich:column>
	                    <h:outputText value="#{wrapper.revisionType}" />
					</rich:column>
					<rich:column>
	                    <h:outputText value="#{wrapper.revisionEntity.revisionDate}">
	                    	<f:convertDateTime pattern="dd-MM-yyyy HH:mm" />
	                    </h:outputText>
					</rich:column>
					<rich:column>
	                    <h:outputText value="#{wrapper.contact.name}" />
					</rich:column>
					<rich:column>
	                    <h:outputText value="#{wrapper.contact.email}" />
					</rich:column>
				</rich:dataTable>    
				<br/>
				<a4j:commandButton value="Back" action="addressBooks" style="150px" />                
			</h:form>
		</f:view>		
	</ui:define>
</ui:composition>